/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.mapper;

import org.apache.ibatis.annotations.Param;
import org.springblade.modules.admin.dto.feishu.LarkContractContinueDTO;
import org.springblade.modules.admin.entity.ElevatorContract;
import org.springblade.modules.admin.vo.ElevatorContractVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.admin.vo.feishu.LarkContractContinueTimelinessVO;
import org.springblade.modules.admin.vo.feishu.LarkContractLoseRateTrendVO;
import org.springblade.modules.admin.vo.feishu.MaintainElevatorContractVO;

import java.util.List;

/**
 * 电梯合同信息 Mapper 接口
 *
 * @author ysq
 * @since 2022-03-01
 */
public interface ElevatorContractMapper extends BaseMapper<ElevatorContract> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param elevatorContract
	 * @return
	 */
	List<ElevatorContractVO> selectElevatorContractPage(IPage page, ElevatorContractVO elevatorContract);

	/**
	 * 获取电梯合同信息(不包括回收站)
	 * @param elevatorId 电梯信息
	 * @return 数据集
	 */
    List<ElevatorContract> getList(@Param("elevatorId") Long elevatorId);

	/**
	 * 获取电梯合同信息
	 * @return 数据集
	 */
    List<MaintainElevatorContractVO> getLarkMaintainElevatorContractList();

	List<LarkContractContinueDTO> getLarkContractContinueList();

    List<LarkContractLoseRateTrendVO> getLarkContractLoseRateTrendList();

	List<LarkContractContinueTimelinessVO> getLarkContractContinueTimelinessList();

    ElevatorContract getLastOfelevatorId(@Param("elevatorId") Long elevatorId,@Param("contractId") Long contractId);


	/**
	 * 获取所有的合同,包括不停保协议
	 * @return 电梯
	 */
    List<ElevatorContract> getListAll(@Param("elevatorId") Long elevatorId);
}
